home *** CD-ROM | disk | FTP | other *** search
/ Programming Windows 95 with MFC / Programming Windows 95 with MFC (Microsoft Programming Series)(097-0001465)(1996).iso / CODE / Chap05 / CtlDemo5 / CtlDemo5.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-05  |  1.1 KB  |  55 lines

  1. //***********************************************************************
  2. //
  3. //  CtlDemo5.h
  4. //
  5. //***********************************************************************
  6.  
  7. class CColorStatic : public CStatic
  8. {
  9. protected:
  10.     COLORREF m_crTextColor;
  11.     COLORREF m_crBkColor;
  12.     CBrush m_brBkgnd;
  13.  
  14. public:
  15.     CColorStatic ();
  16.     void SetTextColor (COLORREF);
  17.     void SetBkColor (COLORREF);
  18.  
  19. protected:
  20.     afx_msg HBRUSH CtlColor (CDC*, UINT);
  21.     DECLARE_MESSAGE_MAP ()
  22. };
  23.  
  24. class CMyApp : public CWinApp
  25. {
  26. public:
  27.     virtual BOOL InitInstance ();
  28. };
  29.  
  30. class CMainWindow : public CFrameWnd
  31. {
  32. private:
  33.     int m_cxChar;
  34.     int m_cyChar;
  35.     CFont m_font;
  36.  
  37.     CColorStatic m_ctlText;
  38.     CButton m_ctlRadioButtonRed;
  39.     CButton m_ctlRadioButtonGreen;
  40.     CButton m_ctlRadioButtonBlue;
  41.     CButton m_ctlGroupBox1;
  42.     CButton m_ctlGroupBox2;
  43.  
  44. public:
  45.     CMainWindow ();
  46.  
  47. protected:
  48.     afx_msg int OnCreate (LPCREATESTRUCT);
  49.     afx_msg void OnRedButtonClicked ();
  50.     afx_msg void OnGreenButtonClicked ();
  51.     afx_msg void OnBlueButtonClicked ();
  52.  
  53.     DECLARE_MESSAGE_MAP ()
  54. };
  55.